Skip to content

docs(adr-0055,skills-data): wording follow-ups from the writeRequiresMasterRead reviews - #34075

Merged
os-zhuang merged 2 commits into
mainfrom
claude/project-thread-llaqwa
Nov 16, 2026
Merged

os-zhuang merged 2 commits into
mainfrom
claude/project-thread-llaqwa

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread

Fixes #33432

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:ADR-0055 补 5 处措辞(7 Sep 链式写入条与 7 Nov 状态行加 ⚠️ 指向 11-14 修订、"every refusal" 收窄为 "every master-gate refusal"、裁决原文补上末句「HotCRM 的设计授权全部兑现。」、补一句"读不到主记录的人按条件批量写入时什么都不写");data 技能 relationships.md 两处措辞、对应 eval 加 3 条 must_not_contain。
  • 为什么改:两次契约复审留下的措辞尾巴。旧措辞会让读者以为开了 writeRequiresMasterRead 后设置主记录仍要编辑权,从而给主记录多授编辑权。
  • 风险与回滚:纯文字,无代码、无契约改动;技能文件 token 数不变(4232/4232),棘轮行未动。回滚即 revert 本 PR。
  • 先看:docs/adr/0055-master-detail-controlled-by-parent.md(第 10、141、273、286、298 行),skills/objectstack-data/rules/relationships.md(第 85–91、110–111 行)。
  • 两分钟验证:node scripts/check-skills-token-ratchet.mjs && pnpm check:adr-symbol-anchors && pnpm check:adr-index,预期全部 exit 0,relationships.md 显示 4232 / 4232。
  • 需要你做的:批准本 PR(受管面 Tier H,docs/adr/** 与 skills/**)。

What changes

docs/adr/0055-master-detail-controlled-by-parent.md (review 6883816828, nits 1 to 5; every nit re-read on main e71ecc1b, none already settled, so none dropped). The 2026-11-15 notes from PR #33992 (#33696) are untouched.

  1. The 2026-09-07 amendment's Write bullet ("running the same three master-edit legs … on every hop") keeps its sentence and gains an in-place ⚠️ Amended 2026-11-14 (#33250 / PR #33369) note: a hop that declares writeRequiresMasterRead asks read and ends the walk (security-plugin-cbp-write-gate.ts#assertControlledByParentChainEditable), pointing to the 2026-11-14 amendment.
  2. The 2026-11-07 status line ("setting a master asks edit on it, emptying one asks edit on the stored master") gains a ⚠️ note in the form the 2026-10-26 line already carries: on an opted-in detail the new and the stored master are each asked read; the null-master owner rule is unchanged. scripts/adr-index.mjs --json output is byte-identical before and after (cmp exit 0): its status reader reads only the **Status**: line.
  3. "### The invariant": "every refusal still says 'requires edit access'" → "every master-gate refusal …" (the 2026-11-07 null-master owner refusal never said that; the code agrees: masterGateRefusalUserCopyOf answers undefined for it).
  4. The ruling quote is called verbatim and now is: the record 6880588685's last sentence 「HotCRM 的设计授权全部兑现。」 is added, byte-identical to the record's option text (141 bytes each), and the English gloss covers it.
  5. "What a refusal answers" gains the predicate case: a predicate (multi: true) update or delete by a caller who cannot read the master selects none of that master's rows, judges no master for them and writes none of them, with no refusal, as on a detail that does not opt in. Verified by reading main: security-plugin-addressed-writes.ts#readableRowsScopeForPredicateWrite narrows the matched set to readable rows, and security-plugin-cbp-write-gate.ts#controlledByParentPredicateWriteMasters judges the masters of those rows only; the opt-in never touches the read side (zero writeRequiresMasterRead hits in the read filter, addressed-writes and authz middleware). Worded per master, because one predicate can also select rows under masters the caller does read.

skills/objectstack-data/rules/relationships.md (review 6883930925):

  • N1: "(even under ownerMayEdit; read under writeRequiresMasterRead)" → "(both even under ownerMayEdit; read for both under writeRequiresMasterRead)": setting and emptying a master both ask read under the key.
  • N2: the ownership floor now binds on-behalf-of updates and deletes "for both users" (ADR-0055 2026-11-14: a delegated by-id write keeps both principals' floors, ADR-0090 D10).
  • Paid by one cut in the same section (standing ruling 「A:先削重复,余额按实测提高」): the ownerMayEdit bullet's list "insert, delete, predicate (multi: true) updates and on-behalf-of writes still need master edit" → "every other write, on-behalf-of included, still needs master edit". Surviving homes: the section's own default two lines above ("by default, every write needs edit on the master") with the bullet's "only"; the multi: true gloss lives in references/data-hooks.md and rules/security.md. No re-wrap pays for anything.

skills/objectstack-data/evals/objects-fields-relationships.json: the writeRequiresMasterRead case (found by content, id: 17) gains three must_not_contain strings: both orders of ownerMayEdit: true beside the key, and the key on the master_detail field (required: true, writeRequiresMasterRead). None occurs in the case's own expected_output; all four must_contain strings do. No other case changes (JSON compare against the base).

.changeset/33432-cbp-write-opt-in-wording.md: @objectstack/skills patch, carrying both declaration lines.

Token readings (ceil(utf8 bytes / 4), node scripts/check-skills-token-ratchet.mjs)

Reading Before After
rules/relationships.md (ceiling 4232) 4232 (16925 bytes) 4232 (16925 bytes), headroom 0, row unchanged
evals/objects-fields-relationships.json (not ratcheted) 5466 5511
Whole skills/objectstack-data package 52950 52995
Sum of all SKILL.md 59218 59218
Bundle total (whole shipped tree) 246388 246433

The +45 is the eval file alone.

Why

Authors and agents read ADR-0055 and the data skill to decide which grant a detail write asks. A stale bullet or an open-scoped parenthetical tells some readers that setting a master still asks edit under the opt-in, and they over-grant edit on the master to get a write through.

Acceptance notes

  • Authoring tier (deviation, declared). dispatch-gates --tier makes the contract-review tier MANDATORY for docs/adr/** and skills/**; the card thread is served below it, so the text was authored and committed by an isolated os-dev subagent pinned to that tier on this branch. The thread merged main, ran the gates, opened this PR and wrote the report.
  • Observation, nothing filed: the 2026-11-07 "Chains" bullet ("a chain hop with no master of its own ends the chain under the same rule") carries no 2026-11-14 note; the 2026-11-14 Gate bullet covers it in general terms. Not one of the five nits.
  • Carrier security: an unrestricted reader of a controlled_by_parent detail with a required FK drops the vacuous parent-chain leaf (epic #33631 R4) #33696: once its code lands, one reader class reads a required master's empty or dangling rows; the 404 sentence and the new predicate sentence both rest on "a detail row's read derives from its master (§2)" and will need that card's note.
  • Eval limits: the three strings catch single-line spellings only. The case's expected_output still says the floor "binds predicate and on-behalf-of updates and deletes" (true, not refined to "both users"); left, since only must_not_contain was in scope.
  • Forced test edits: none.

Verification

Head e84ff32f (base fb79d47c + merge of main e71ecc1b). node scripts/pm/dispatch-gates.mjs --commands derived 51 commands; each run with its exit captured before any pipe, then reconciled with --ran.

Gate readings

Run on head e84ff32f, 51/51 exit 0. check:dual-build-cjs-loads first answered exit 3 (PREREQUISITE NOT MET: needs every package dist); after turbo run build --filter='./packages/**' under os-verify-lock (VERDICT command-exit 0, 5m47s) it answered exit 0. --ran reconciliation: "51 derived famil(ies) accounted for — 51 run, 0 NOT-MEASURED (a DERIVED zero)". Also exit 0 on the authored head c5cc5319: pnpm check:skill-eval-tokens (ui), pnpm --filter @objectstack/spec check:skill-docs, check:skill-refs, check:skill-examples, node scripts/adr-index.mjs --check, check-skills-token-ratchet.mjs --self-test (104 cases).

node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0
node scripts/check-adr-0087-registration.mjs --self-test :: exit 0
node scripts/check-adr-links.mjs :: exit 0
node scripts/check-adr-links.mjs --self-test :: exit 0
node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-doc-route-spelling.mjs --advisory :: exit 0
node scripts/check-doc-route-spelling.mjs --self-test :: exit 0
node scripts/check-dts-emitted.mjs --self-test :: exit 0
node scripts/check-empty-changeset.mjs --base origin/main :: exit 0
node scripts/check-empty-changeset.mjs --self-test :: exit 0
node scripts/check-skills-token-ratchet.mjs :: exit 0
node scripts/check-skills-token-ratchet.mjs --self-test :: exit 0
node scripts/ci/assert-turbo-remote-cache.mjs --self-test :: exit 0
node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0
node scripts/ci/prune-turbo-cache.mjs --self-test :: exit 0
node scripts/ci/snapshot-next.mjs --self-test :: exit 0
node scripts/pm/check-governed-queue-guard.mjs --self-test :: exit 0
node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0
node scripts/release-pending-publish.mjs --self-test :: exit 0
pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0
pnpm check:adr-anchors :: exit 0
pnpm check:adr-index :: exit 0
pnpm check:adr-symbol-anchors :: exit 0
pnpm check:agent-test-spelling :: exit 0
pnpm check:changeset-gate-self-tests :: exit 0
pnpm check:ci-filter-parity :: exit 0
pnpm check:closed-ceremony-text :: exit 0
pnpm check:corpus-claim-drift :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:doc-authoring :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:dts-closure :: exit 0
pnpm check:dual-build-cjs-loads :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:lean-entry-closure :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:pm-governed-merges :: exit 0
pnpm check:pm-prior-rulings :: exit 0
pnpm check:pm-skill-id-lint :: exit 0
pnpm check:published-files :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:role-word :: exit 0
pnpm check:skill-compatibility :: exit 0
pnpm check:skill-frame-sync :: exit 0
pnpm check:skill-identifier-liveness :: exit 0
pnpm check:skill-links :: exit 0
pnpm check:sourcemap-no-sources-content :: exit 0
pnpm check:watch-hint-literal :: exit 0

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (not touched)
  • 2. Every name I added uses the casing for its kind. (no names added)
  • 3. No formatter ran; pnpm lint passes. (no code changed; pnpm lint was not run locally, CI runs it)
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed. (not touched)
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

Generated by Claude Code

…MasterRead reviews

ADR-0055:
- the 2026-09-07 "What both halves do now" Write bullet gains a
  2026-11-14 note in place: a hop whose detail declares
  writeRequiresMasterRead asks read on its master and the walk ends
  there;
- the 2026-11-07 status line gains the note its body line already
  carries: under the key, setting a master and emptying one each ask
  read;
- "The invariant" says "every master-gate refusal" where it said "every
  refusal": the owner rule's refusal of a null-master row never said
  "requires edit access";
- the ruling quote carries its last sentence, byte for byte as ruling
  record 6880588685 gives it, and the English gloss covers it;
- "What a refusal answers" says what a predicate write does for a
  master the caller cannot read: it selects none of that master's rows,
  judges no master for them, writes none of them and answers no refusal
  (readableRowsScopeForPredicateWrite,
  controlledByParentPredicateWriteMasters).

skills/objectstack-data, rules/relationships.md:
- setting a master and emptying one both ask read under
  writeRequiresMasterRead, and both ask edit under ownerMayEdit;
- on an on-behalf-of update or delete the ownership floor binds for
  both users;
- paid for in the same section: the ownerMayEdit bullet says "every
  other write, on-behalf-of included" where it listed the writes (the
  default rule above it and the bullet's own "only" carry the list).
  16925 bytes before and after, 4232 tokens, ceiling row unmoved.

evals/objects-fields-relationships.json, the writeRequiresMasterRead
case only: must_not_contain gains the refused ownerMayEdit pair in both
orders and the key written on the master_detail field.

Claude-Session: https://claude.ai/code/session_01ADHkmSuNnnr3JQjtkn1a28
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 15, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: e84ff32f174c84426369ca12acb6180f3b5fd8c2
Local-runs: probe — check-governed-merges --pr 34075, the read-only landing-tier predicate the brief orders (exit 3, Tier H); nothing built, tested or re-run
Scope: docs/adr/0055-master-detail-controlled-by-parent.md, skills/objectstack-data/evals/objects-fields-relationships.json, skills/objectstack-data/rules/relationships.md + none

Inputs read: card #33432, its body and all four comments (triage 6884668843, unblock 6885442825, claim 6898254257, os-dev report 6898746382); PR #34075, its body, its four-file list and the net diff of the head against main at merge-base e71ecc1b (the head carries that merge; main has since moved to d3bea96d by two commits that touch none of the four files, no ADR, no skill, no ratchet row and none of the code cited below); the check-runs on the head. The diff's fourth file, .changeset/33432-cbp-write-opt-in-wording.md, is a prose face outside hits; it was read for ② and for F4. The records the card cites were read on their PR threads: 6883816828 (PR #33425) and 6883930925 (PR #33427), with the corrections beside them (6886594154, 6886599681) and the at-tier re-reviews that replaced them (6886893250, 6886869736); and ruling record 6880588685 on #33250. Read to judge, not reviewed, on origin/main: in packages/plugins/plugin-security/src/, security-plugin-cbp-write-gate.ts, security-plugin-addressed-writes.ts, security-plugin-authz-middleware.ts (steps 2.7, 2.8 and 3), security-plugin-cbp-read-filter.ts and security-plugin.ts (RlsFilterOptions.masterGateCoversThisWrite, platformFloorYieldsToObjectWriteModel); and packages/objectql/src/engine-security-resolvers.ts (how the engine answers a ReadableIds leaf). The diff carries no implementing file, hence + none.

Check-runs on the head, read four times, the last after 18:11Z: 45 runs, 29 success, 16 skipped, 0 failed, none still running. Test Core (1/8) and the aggregate Test Core were still running at the earlier reads and finished green at 18:10Z and 18:11Z. Green: Check Changeset, Check Documentation Links, Check PR Size, Governed Surface Queue Guard, PR-body guards, Lint and Repo Gates with all eight Lint shards (repo and tooling gates runs the ADR anchor and index gates, docs and code guards runs the ADR symbol anchors), TypeScript Type Check with its four shards (source gates runs the skills token ratchet), Build Core, Plan Test Core shards, Test Core with its shards 1/8 and 2/8, Test UI, Live E2E UI, Dogfood Regression Gate, Auto Label and filter. The 16 skipped runs are path-filtered, queue-only, schedule and opt-in jobs. The head has not moved since.

① Derived judgments

No accept-set and no public surface moves: the diff holds no schema, .describe(), export, refusal or runtime code. What it publishes is prose in one rule file and three assertion strings in one eval case of @objectstack/skills. What it implies is the truth of each sentence it adds or changes, judged against main.

ADR-0055, five edits (lines 10, 141, 274, 287 and 298 on the head).

  1. Line 141, new note under the 2026-09-07 Write bullet. Added: "On every hop" no longer holds for a hop whose detail declares writeRequiresMasterRead: there the walk (...security-plugin-cbp-write-gate.ts#assertControlledByParentChainEditable) asks whether the principal can read the master row in place of the three edit legs, and ends at that hop; the read door answers for the chain above it. A hop that does not declare the key runs the edit legs as before. Right. On main, if (hopRel.writeRequiresMasterRead) { await assertMasterRowReadable.call(this, hopRel, hopMasterId, context, masterEditDenied); break; } stands ahead of await this.assertMasterRowEditable(...). assertMasterRowReadable is one by-id read of the master under the principal's own context, which for a controlled_by_parent master is the chain the engine composes. The walk asks read and stops at that hop.
  2. Line 10, note appended to the 2026-11-07 status line. Added: that "setting a master asks edit on it, emptying one asks edit on the stored master" no longer holds on a detail that declares writeRequiresMasterRead: there the new master and the stored master are each asked read. The owner rule of the null-master row is unchanged. Right. Every master a write involves reaches that one walk with the detail's own relation: the stored master (masterId = row[rel.fk]), the body-named master (askBodyNamedMaster calls assertControlledByParentChainEditable(permissionSets, object, rel, named, ...)), and an emptied optional master (its stored master is walked, and askBodyNamedMaster returns on rel.optional). So setting and emptying both ask read under the key. On a stored null-master row nullMasterRowWritable still runs first, then askBodyNamedMaster([]). The quoted fragment is contiguous text of the line, and the form is the 2026-10-26 line's. F2 covers the clause the note leaves unmarked.
  3. Line 274, the ruling paragraph. The quote gains 「HotCRM 的设计授权全部兑现。」 and the gloss gains "HotCRM's designed grants are all honoured." Right. Record 6880588685 gives "Option text verbatim" as those two sentences. The ADR's quote equals it character for character: 53 characters, 141 bytes, two ASCII commas, one space. "verbatim" is now true.
  4. Line 287, sentence appended to "What a refusal answers". Added: A predicate (multi: true) update or delete by a caller who cannot read the master selects none of that master's rows, so it judges no master for them, writes none of them and answers no refusal, as on a detail that does not opt in: its matched set is narrowed to the rows the caller can read (...#readableRowsScopeForPredicateWrite), a detail row's own read deriving from its master (§2), and the gate judges the masters of those rows only (...#controlledByParentPredicateWriteMasters). Right, and it reads per master ("that master's rows", "for them", "none of them"; the closing "answers no refusal" is read with them, since a refusal can still come from another master or from a null-master row the same predicate does select). On main the read leaf is { [rel.fk]: { $in: ReadableIds.of(rel.master) } }, and for a parent the caller cannot read the engine composes the empty id list (canReadObject false gives $in: []), not a refusal. controlledByParentPredicateWriteMasters reads the caller's own predicate under the request's context and takes masters from those rows alone (if (ids.length === 0) return { masterIds: [], nullMasterRows: [] }); the gate's own comment reads "A write that selects no row the caller can read writes nothing, so it involves no master". Step 3 composes readableRowsScopeForPredicateWrite ({ id: { $in: ids } }) onto the addressed predicate write: "a hidden row is not written, not counted and not refused". Neither function reads the opt-in, so "as on a detail that does not opt in" holds. Both anchors name exported functions. The sentence follows the checkControlledByParentWrite sentence, so that sentence's "all of them" does not come to cover it.
  5. Line 298, the invariant. Changed to: every master-gate refusal still says "requires edit access". Right, in the code's use of the term. With no declaring object, every refusal masterEditDenied builds is requires ${question} access to its master record (${reason}) with question at its default edit, the chain refusals included, and the withheld form for a caller who cannot read the master reference says the same. The 2026-11-07 null-master owner refusal is outside the universal: its sentence is "is permitted only to the record's owner or a holder of Modify All on ...", and masterGateRefusalUserCopyOf answers undefined for it ("not a master-access refusal of this gate"). One correction, to the PR body and commit message and not to the tree: that refusal does say "requires edit access" to a caller who cannot read the reference, because assertControlledByParentWrite rewords every refusal that carries a leg. The ADR sentence holds either way. F1 answers the wording question.

The two new ⚠️ marks sit on text that is false under the opt-in, and on nothing else. The four 2026-11-15 notes of PR #33992 (lines 6, 12, 58 and 237) are byte-identical to main, and nothing added contradicts them: the read change they record has not landed (computeControlledByParentFilter on main has no such branch), and they say so. F3 names what follows when it does.

relationships.md, three sentences.

  1. Changed to: ownerMayEdit: true widens only the row owner's (owner_id) by-id update; every other write, on-behalf-of included, still needs master edit. Right. The owner leg asks operation === 'update', a stored row, no onBehalfOf.userId, the caller as owner_id, a body that does not empty an optional master, and a master the caller can read. Every other write takes the edit walk.
  2. Changed to: The ownership floor (rows you created) still binds predicate and, for both users, on-behalf-of updates and deletes. Right. Step 2.7 sets masterGateCoversThisWrite = !delegatorSets and ANDs the delegator's own write filter (computeRlsFilter(delegatorSets, opCtx.object, rlsOperation, delegatorContext)), so a delegated by-id write keeps both principals' floors. The predicate path never sets the vouch ("the BULK write path does NOT, and must not") and composes both principals' layered filters.
  3. Changed to: Setting a master asks edit on it, emptying one edit on the stored master (both even under ownerMayEdit; read for both under writeRequiresMasterRead). Right, by item 2 and by the owner leg: it steps aside for an emptying body, a null-master row never reaches it, and after it admits, askBodyNamedMaster([masterId]) still walks a newly named master with the edit legs.

The file is 16925 bytes on main and on the head, and ceil(16925 / 4) = 4232. The ratchet script is not in the diff, so the row stays 4232 of 4232.

Eval. A JSON compare of the head against main shows one changed case, id 17, and in it only three strings appended to must_not_contain. Ids run 1 to 19 on both.

② Semver level

.changeset/33432-cbp-write-opt-in-wording.md declares '@objectstack/skills': patch. The diff publishes skill prose and one eval fixture entry under skills/**, which that package ships; docs/adr/** ships in no package. Patch matches, in the shape of the skills docs changesets on main (33658, 33868). Check Changeset is green.

Clause-②: no is on the PR body and in the changeset, and it is correct: no authorable key, refusal, export or member is added or removed and no runtime answer moves. The widening these texts describe shipped under Clause-②: yes on PR #33369. Metadata-protocol: none is correct. The changeset's body agrees with the tree sentence by sentence, except that its last sentence is wider than the strings (F4).

③ Boundary flags

  • Authoring. The text was written by an isolated subagent pinned to the contract-review tier, because the card thread is served below it; the claim, the report and the PR body all say so. No contract effect. This record is rendered by a different agent, as ④ requires whatever tier drafted. The author's one REST read of ruling comment 6880588685 is a read on a channel the REST table lists as read-side, and its result is re-checked here through an MCP read (① 3).
  • The main merge. e84ff32f has parents c5cc5319 (authored) and e71ecc1b (main). The four files are identical at c5cc5319 and at the head, and the head differs from e71ecc1b by those four files alone. A clean merge; nothing was authored in it.
  • Append and mark only. Of the ADR's five edits, one is a new line (141), two are appends whose old line is a byte prefix of the new one (10 and 287), and two are insert-only inside the line, with no character removed (274: the quote's last sentence and its gloss; 298: " master-gate"). The card orders both inserts, and both are in the 2026-11-14 section's own text. The **Status**: line is untouched and still reads Accepted (2026-06-19).
  • Same-section pay-down. The cut list ("insert, delete, predicate (multi: true) updates and on-behalf-of writes") is carried by "every other write, on-behalf-of included" under the section's default two lines above ("by default, every write needs edit on the master"). Each cut rule keeps a home; F5 covers the gloss.
  • Eval id 17 only, and PR docs(skills): field-types teaches the dynamic roll-up over a stored home amount #34076. That PR appends case 20 after case 19 (its hunk starts at line 343 of the base). This PR changes line 308 and adds lines 309 to 311, inside case 17, and adds no id. The hunks are more than 30 lines apart, so whichever lands second merges without a conflict and ids run 1 to 20. docs(skills): field-types teaches the dynamic roll-up over a stored home amount #34076 moves a different ratchet row; this PR moves none.
  • Landing tier. check-governed-merges --pr 34075 answers GOVERNED, exit 3, Tier H: 3 of 4 paths hit the register (docs/adr/** once, skills/** twice), the low-risk skills arm does not apply because of the docs/adr/** path, and the size is 36 changed lines. It lands by the maintainer's hand or an authorised approval. Not this record's to give.
  • open_questions, nit 3 wording. Answered: A, keep the card's words on this head. See F1.
  • Dev out-of-scope findings. The security: an unrestricted reader of a controlled_by_parent detail with a required FK drops the vacuous parent-chain leaf (epic #33631 R4) #33696 carrier is F3. The unmarked Chains bullet is F2.
  • The records the card cites. Both were corrected as off-tier and replaced at tier (6886893250, 6886869736). The at-tier records confirm nits 1 to 5 and N1 to N3 and reject none. 6886893250 adds a nit 6 (the "answers deny for all of them" sentence) that this card does not carry and this diff rightly leaves alone; whether it has a carrier is the seat's to check.
  • Standing SQL push-down check. Not applicable: the diff holds no code.
  • PR body only. Its "先看" list names lines 273 and 286; on the head those two paragraphs are lines 274 and 287.

④ Design judgment

docs/adr/0055-master-detail-controlled-by-parent.md: holds against the code it cites and against its first consumer, the gate PR #33369 shipped, as it stands on main. Each of the five nits is met as the card words it. The text is true and proportionate (one new line, four in-line additions), and it agrees with the rest of the record (the 2026-11-14 Gate bullet, the 2026-11-07 body note the status note mirrors), with ADR-0139 D6 (untouched, and silent on the write question) and with the data skill. Nothing here is a decision, so no execution plan is owed.

skills/objectstack-data/rules/relationships.md: holds against the gate and step 2.7 on main. N1 and N2 are met, the reading the card feared (setting a master still asks edit under the key) is closed, and the cut costs no rule.

skills/objectstack-data/evals/objects-fields-relationships.json: holds. Eval 17 is self-consistent: all four must_contain strings occur in expected_output and none of the four must_not_contain strings does. None of the four occurs anywhere in the taught text (the skills markdown, content/docs, the ADRs, object.zod.ts), so an answer that restates the rule in the skill's or the expected output's words trips none. The pair on one line in either order, and the key after required: true on one line, are caught.

Tried to break it by looking for an added sentence that states a wider or narrower rule than main serves. None found. No security item found. Findings:

  • F1, nit. "master-gate refusal". The card's wording, and right in the code's vocabulary: the MasterQuestion docblock reads "The question a master-gate refusal answered on the master it names", and the owner refusal is "not a master-access refusal". Inside the ADR the compound is not defined, "the master gate" names the whole step 2.8 gate (the floors bullet), and the 2026-11-07 section has the owner refusal met by whoever "reaches the gate", so a reader of the ADR alone can still count that refusal in. Option B, "every refusal of the master question", uses a phrase the ADR already defines (the 2026-11-14 status line and Spec bullet) and closes that; 6886893250 asked for "of a master" to the same end. No rule changes either way. Keep A on this head, and take B if the line is touched again.
  • F2, nit. One stale clause left in the line this PR marks. The 2026-11-07 status line also says "a chain hop with no master of its own ends the chain under the same rule". On a hop whose detail declares the key, the walk asks read on that master row and ends before it looks at that row's own reference (the branch in ① 1), so the owner rule is not asked there and the read door answers instead. That clause stays unmarked, and the note's last sentence ("The owner rule of the null-master row is unchanged") is true of the row being written, and repeats the 2026-11-14 section's own "What is unchanged" entry, but can be read over the chain clause. The body's Chains bullet has the same gap, which the dev reported. The new 2026-09-07 note and the Gate bullet state the rule in general terms, so a reader of the whole record is not misled: the class and grade the earlier records gave nits 1 and 2. Follow-up: one clause on both spots.
  • F3, nit, carrier. The predicate sentence, like the 404 sentence before it, rests on "a detail row's own read derives from its master (§2)". True on main today. The 2026-11-15 note records a ruled read change (security: an unrestricted reader of a controlled_by_parent detail with a required FK drops the vacuous parent-chain leaf (epic #33631 R4) #33696) that lands later; for its one reader class both sentences will then need that card's note. The PR body says so and files nothing. The seat hands the carrier to security: an unrestricted reader of a controlled_by_parent detail with a required FK drops the vacuous parent-chain leaf (epic #33631 R4) #33696 so it is not lost.
  • F4, nit. The three strings catch one-line spellings only. The key written on the master_detail field on its own line, the skill's own field style, passes them. They can also fail a right answer that writes the refused literal out in code to warn against it, or that lists required: true, writeRequiresMasterRead: true in plain prose; 6886869736 recorded the same limit for the first string. The changeset's last sentence ("fails an answer that ... puts the key on the master_detail field") is wider than what the strings do; it is a prose face and can be tightened without moving the reviewed files.
  • F5, nit. The multi: true gloss left this file with the cut. It lives on in references/data-hooks.md (lines 181, 195, 287, 288) and rules/security.md (line 68), as the PR body says, but the one "predicate" left in relationships.md, in the floor sentence, now has no gloss beside it. There is no room at 0 headroom; nothing to fix here.

No must-fix, no should-fix.

Implemented-by: claude/project-thread-llaqwa
Reviewed-by: session_01ADHkmRxXmVQ41fqnaTPGAv

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv

维护者速读

  • 改了什么:ADR-0055 补 5 处措辞(2026-09-07 写入条与 2026-11-07 状态行各加 ⚠️ 指向 2026-11-14 修订;「every refusal」收窄为「every master-gate refusal」;裁决原文补上末句「HotCRM 的设计授权全部兑现。」;补一句「读不到主记录的人按条件批量写入时什么都不写、也不报拒」)。data 技能 relationships.md 两处措辞(设置/清空主记录在 writeRequiresMasterRead 下都只问读权;代他人写入的归属底线对双方都生效),eval 17 加 3 条 must_not_contain。+25/−11,changeset @objectstack/skills: patch。
  • 为什么改:两次契约复审留下的措辞尾巴。旧措辞会让读者以为开了 writeRequiresMasterRead 后设置主记录仍要编辑权,从而给主记录多授编辑权。
  • 风险与回滚:纯文字,无代码、无契约改动;relationships.md token 数不变(4232/4232),棘轮行未动。回滚 = revert。
  • 先看:docs/adr/0055-master-detail-controlled-by-parent.md 第 10、141、274、287、298 行(PR 正文写的 273/286 在当前 head 上各差一行),skills/objectstack-data/rules/relationships.md 第 85–91、110–111 行。
  • 两分钟验证:在 main 上看 security-plugin-cbp-write-gate.ts 的 assertControlledByParentChainEditable:writeRequiresMasterRead 分支先问读权再 break,与第 141 行新注一致。
  • 需要你做的:受管面 Tier H(docs/adr/** 与 skills/**)。达档(CONTRACT_REVIEW_TIER)复审 6899080787 在本 head PASS,无 must-fix、无 should-fix。请批准并合并,或批准后由席位落地。
  • 席位意见:可以合。

席位核对

Verdict: ACCEPT, held for the maintainer · head e84ff32f174c84426369ca12acb6180f3b5fd8c2 · card #33432 · report 6898746382 · at-tier contract review 6899080787 (PASS on this head, nits F1–F5) · read 2026-11-15T18:21Z.

  • Shape: draft → main, Fixes #33432. Five append-or-insert edits in ADR-0055 (the **Status**: line untouched), two wording edits plus one same-section cut in skills/objectstack-data/rules/relationships.md, three must_not_contain strings in eval case 17, changeset '@objectstack/skills': patch. GOVERNED, Tier H (check-governed-merges --pr 34075 exit 3; docs/adr/** keeps it out of the low-risk skills arm). Clause-②: no; Metadata-protocol: none.
  • Premise measured: PR docs(adr-0055): record the 2026-11-14 amendment, writeRequiresMasterRead — read on the master is enough to write, by opt-in #33425 and PR docs(skills): teach sharing.controlledByParent.writeRequiresMasterRead in the controlled_by_parent rules #33427 merged; every nit of 6883816828 and 6883930925 re-read on main e71ecc1b, none already settled. The review checked each added sentence against security-plugin-cbp-write-gate.ts, security-plugin-addressed-writes.ts and the authz middleware on main, and the ruling quote byte for byte against record 6880588685.
  • Gates: on this head 45 check-runs, 29 success, 16 skipped (path-filtered, queue-only, schedule, opt-in), 0 failed, none running. Dev on this head: 51 derived, 51 exit 0, --ran reconciles.
  • Accepted deviations: authoring by a subagent pinned to CONTRACT_REVIEW_TIER inside a lower-tier thread (declared in the claim and body). Main merged in cleanly, nothing authored in the merge. Nits F1 (keep the card's "master-gate refusal" wording on this head), F4 (eval strings catch one-line spellings only; the changeset's last sentence is wider than the strings) and F5 (the multi: true gloss lives on in references/data-hooks.md and rules/security.md; 0 headroom) are left as they are. The body's 先看 line numbers (273/286 for 274/287) are corrected above.
  • Out of scope: F3, the "a detail row's own read derives from its master (§2)" carrier, is handed to security: an unrestricted reader of a controlled_by_parent detail with a required FK drops the vacuous parent-chain leaf (epic #33631 R4) #33696 with a note there. F2 (the 2026-11-07 status-line chain clause and the Chains bullet still unmarked for writeRequiresMasterRead) goes to a follow-up card.
  • Landing: Tier H. The seat does not flip this PR ready or enqueue it. It needs the maintainer's merge, or an authorised APPROVED review after which the seat lands it.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 15, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 16, 2026 01:08
@os-zhuang
os-zhuang enabled auto-merge November 16, 2026 01:08
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit b51cb18 Nov 16, 2026
51 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-llaqwa branch November 16, 2026 01:41
@objectstack-fleet objectstack-fleet Bot removed the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

3 participants